# Contributor: Sodface <sod@sodface.com>
# Maintainer: Sodface <sod@sodface.com>
pkgname=touchegg
pkgver=2.0.17
pkgrel=0
pkgdesc="Multitouch gesture recognizer"
url="https://github.com/JoseExposito/touchegg"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	cairo-dev
	cmake
	eudev-dev
	glib-dev
	gtk+3.0-dev
	libinput-dev
	libx11-dev
	libxi-dev
	libxrandr-dev
	libxtst-dev
	pugixml-dev
	samurai
	"
options="!check" # No test suite
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/JoseExposito/touchegg/archive/$pkgver.tar.gz
	$pkgname.initd"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DUSE_SYSTEMD=off
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm755 "$srcdir"/touchegg.initd \
		"$pkgdir"/etc/init.d/touchegg
}

sha512sums="
b0c957003f0df1c3fdb750e0f3a253ed39014c900c82ffa7be254afe6c2a60949ea81d2628bf3d40ad4f3547093b274fb20831144c2427b417262812a10d563d  touchegg-2.0.17.tar.gz
4c334bfd81f372e700f57670c17b9bf52b37adc37a62ae466d47e6ae67e14df5dffff5b80b4c031f2dc46b00077d8be8fc18e87214c682fb4130d87e599fd597  touchegg.initd
"
